<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
<head>
    <title>管理平台</title>
    <jsp:include page="../../include/header.jsp"></jsp:include>
    <style type="text/css">
			table td{
			text-align: center;
			white-space: normal; 
			overflow: hidden;
		    text-overflow: ellipsis;
			}
		 	table th{
			text-align: center;
		 	}
		 	
	</style>
</head>
<body>
<div id="wrapper" class="row">

			<div class="col-lg-12">
				<h1 class="page-header">发货供应商管理</h1>
				<div class="pull-right">
			
						<button type="button" class="btn btn-success margin-lr" title="新建"  onclick="toAdd()" >
							<i class="fa fa-file-o"></i> 新建
						</button>
						<button type="button" class="btn btn-success margin-lr" title="刷新" 
							onclick="window.location.reload();">
							<i class="fa fa-refresh"></i> 刷新
						</button>
				
			</div>
			</div>
		<!-- 数据表格 -->
		<div class="col-lg-12">
			
			<%-- <div class="box-tools pull-right">
				<div class="has-feedback">
					规格名称：<input type="text" name="specName" id="specName" size="12" placeholder="规格名称"><button class="btn btn-default" onclick="findspecName(${specName})">查询</button>
				</div>
			</div> --%>
		<!--工具栏/-->
			<!--数据列表-->
			
			<div class="col-lg-12 title-top" >
			<table id="dataList"
				class="table table-bordered table-striped table-hover dataTable">
				<thead>
					<tr>
						<th class="sorting_asc">厂家ID</th>
						<th class="sorting">厂家名字</th>
						<!-- <th class="sorting">规格参数</th> -->
						<th class="text-center">操作</th>
					</tr>
				</thead>
				<tbody id="dataList">	
					<c:forEach items="${listSendSeller}" var="sendSeller">
						<tr>
							<td>${sendSeller.id }</td>
							<td>${sendSeller.sendSellerName }</td>
							<%-- <td>
							<button type="button" class="btn btn-success" title="详情"  onclick="toDetail('${Spec.id }')" >详情</button>
							</td> --%>
							<td class="text-center">
								<button type="button" class="btn btn-success" title="新建"  onclick="toEdit('${sendSeller.id}')" >编辑</button>
								<button type="button" class="btn btn-success" title="删除"  onclick="toDelete('${sendSeller.id}')">删除</button>
							</td>
						</tr>
					</c:forEach>
				</tbody>
			</table>
		</div>
        	<div class="col-lg-12">
        		<ul id="dataPagination" class="pagination-sm pull-right"></ul>
        	</div>
        </div>
</div>
<jsp:include page="../../include/javascripts.jsp"></jsp:include>
<script type="text/javascript">
    /* 点击新增规格选项 */
var addDialog;
function toAdd(){
	addDialog = Kit.dialog("添加","${BASE_PATH}/dict/sendseller/toAdd",{closable:true,size:'size-wide'}).open();		
  }
var editDialog;
function toEdit(id){
	editDialog = Kit.dialog("编辑","${BASE_PATH}/dict/sendseller/toEdit/"+id,{closable:true,size:'size-wide'}).open();		
  }
function toDelete(id){
	Kit.confirm("提示","您确定要删除这条数据吗？",function(){
		$.post("${BASE_PATH}/dict/sendseller/doDelete/"+id,function(result){
			$("#Spec"+id).remove();
		});
	});
}

</script>
</body>
</html>